import { isStr } from './whether';

export function filterObjects(data, items = []) {
  const objects = {};
  const elements = isStr(items) ? items.split(',') : items;
  elements.forEach(item => (objects[item] = data[item]));
}
